package com.gaoke.simpleerp.exception;

/**
 * Service层公用的Exception.继承自RuntimeException,在函数中抛出会触发Spring的事务管理器引起事务回退.
 * 
 * @author weijun.huwj
 * 
 */
public abstract class ServiceException extends RuntimeException {
    public ServiceException(String code, String message) {
        super();
        this.code = code;
        this.message = message;
    }

    /**
     * serialVersionUID.
     */
    private static final long serialVersionUID = 2556907415712730617L;
    /**
     * 错误代码.
     */
    private String code;
    /**
     * 错误信息.
     */
    private String message;

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

}
